<template>
  <el-row class="login-container">
    <el-col :lg="16" :md="12" class="left">
      <div>
        <h1>欢迎光临</h1>
        <p>
          此为练习项目《vue3 + vite实战商城后台开发》<a
            class="font-bold"
            href="https://gitee.com/AcigaleDy/vue3-vite-mall-backend"
            target="_blank"
            >点我去gitee仓库地址</a
          >
        </p>
      </div>
    </el-col>
    <el-col :lg="8" :md="12" class="right">
      <h2>欢迎回来</h2>
      <div>
        <span class="line"></span>
        <span>账号密码登录</span>
        <span class="line"></span>
      </div>
      <el-form :model="userInfo" class="w-[250px]">
        <el-form-item>
          <el-input v-model="userInfo.name" placeholder="请输入用户名">
            <template #prefix>
              <el-icon><User /></el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-input v-model="userInfo.keyword" show-password placeholder="请输入密码">
            <template #prefix>
              <el-icon><Lock /></el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-button class="w-[250px]" type="primary" color="#626aef" round>登 录</el-button>
        </el-form-item>
      </el-form>
    </el-col>
  </el-row>
</template>

<script setup>
  import { ref } from 'vue';
  import 'element-plus/theme-chalk/display.css';
  const userInfo = ref({
    name: '',
    keyword: '',
  });
</script>

<style scoped>
  .login-container {
    @apply min-h-screen bg-indigo-500;
  }

  .login-container .left,
  .login-container .right {
    @apply !flex justify-center items-center;
  }

  .login-container .right {
    @apply flex-col bg-light-50;
  }

  .login-container .left > div {
    @apply px-[10vw];
  }

  .login-container .left > div > :first-child {
    @apply text-4xl font-bold text-light-50 mb-5;
  }

  .login-container .left > div > :last-child {
    @apply text-gray-200 text-sm;
  }

  .login-container .right > :first-child {
    @apply text-3xl font-bold text-gray-800 mt-[24px];
  }

  .login-container .right > :nth-child(2) {
    @apply flex justify-center items-center mt-5 mb-8 text-gray-300 space-x-2;
  }

  .login-container .right > :nth-child(2) > .line {
    @apply h-[1px] w-16 bg-gray-200;
  }
</style>
